home *** CD-ROM | disk | FTP | other *** search
- global HARP, TIGO, HORN, DRUM, CHIME, BASS, sPALETTE, gObjects, gOBJECTSD, gWorld, gPuppetlines, gLastKeyList, gNotes, gNextEnvLetter, gNextDIRFile, gMIDIPlayTRUE, gInitalized, noteObjs, windowsMIDIXObj, xNAVXOBJ, xCURXOBJ, gCPU, gFileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName
-
- on InitEnviromentObjects
- set sPALETTE to 2
- set gOBJECTSD to [:]
- INITintruments()
- InitMixer()
- InitJukeBox()
- ProcessCastObjects(gOBJECTSD)
- sort(gObjects)
- end
-
- on PlayMusic INTRument
- end
-
- on PlaytheNote INTRument
- set OBj to getaProp(gObjects, INTRument)
- set note to getRandomNote(DRUM, 3, 8)
- noteOn(INTRument, note, 127)
- repeat while the mouseDown
- CursorandUpdate()
- end repeat
- noteOff(INTRument, note)
- end
-
- on PlayNoteFromHitMap INTRument
- set OBj to getaProp(gObjects, INTRument)
- set lastNoteTime to the ticks - 10
- repeat while the mouseDown
- if the ticks < (lastNoteTime + 5) then
- next repeat
- end if
- set note to xCURXOBJ(mWhere, the mouseH, the mouseV)
- if note > 0 then
- if note > 127 then
- set note to note / 2
- end if
- noteOn(INTRument, note, 127)
- set duration to random(30)
- set start to the ticks
- repeat while the ticks < (start + duration)
- CursorandUpdate()
- end repeat
- noteOff(INTRument, note)
- set lastNoteTime to the ticks
- end if
- end repeat
- end
-
- on LoadChoaticHitMap INTRument
- set Mapref to string(INTRument & "Map")
- set pathName to string(gCDName & "CODE" & gFileSep & Mapref & ".BMP")
- set xCURXOBJ to OffScreen(mnew, pathName, 0, 0, 4)
- end
-
- on playDJVO
- playSound("D07DJaa.aif", #keyframeFile, 1)
- end
-
- on EnterD04
- if voidp(getaProp(getaProp(gStates, #BeenThere), #d04)) then
- Startthetimer(1, "playDJVO")
- PDARelease("J05rad.mov")
- end if
- if not voidp(gLastKeyList) then
- if char 1 of string(getaProp(gLastKeyList, #RefName)) <> "D" then
- MakeDynamic(#DJVid, #newhit, #enter)
- InitMidiGlobals()
- end if
- else
- MakeDynamic(#DJVid, #newhit, #enter)
- InitMidiGlobals()
- end if
- end
-
- on UnLoadChoaticHitMap
- xCURXOBJ(mdispose)
- end
-
- on Entertimur
- LoadChoaticHitMap(#timur)
- end
-
- on Exittimur
- UnLoadChoaticHitMap()
- end
-
- on EnterHarp
- LoadChoaticHitMap(#HARP)
- end
-
- on ExitHarp
- UnLoadChoaticHitMap()
- end
-
- on EnterBAss
- if getaProp(getaProp(gObjects, #BASS), #State) = #nonChaotic then
- set pathName to string(gCDName & "CODE" & gFileSep & "BASSLine.BMP")
- set xCURXOBJ to OffScreen(mnew, pathName, 0, 0, 1)
- else
- if getaProp(getaProp(gObjects, #BASS), #State) = #Chaotic then
- LoadChoaticHitMap(#BASS)
- end if
- end if
- end
-
- on ExitBAss
- if getaProp(getaProp(gObjects, #BASS), #State) = #nonChaotic then
- UnLoadChoaticHitMap()
- else
- if getaProp(getaProp(gObjects, #BASS), #State) = #Chaotic then
- UnLoadChoaticHitMap()
- end if
- end if
- end
-
- on EnterHorn
- LoadChoaticHitMap(#HORN)
- end
-
- on ExitHorn
- UnLoadChoaticHitMap()
- end
-
- on EnterDrum
- LoadChoaticHitMap(#DRUM)
- end
-
- on ExitDrum
- UnLoadChoaticHitMap()
- end
-
- on EnterChime
- LoadChoaticHitMap(#CHIME)
- end
-
- on ExitChime
- UnLoadChoaticHitMap()
- end
-
- on EnterMixer
- set this to Startthetimer(1, "IntruDetails")
- if getaProp(getaProp(gStates, #BeenThere), #D22) = 1 then
- end if
- MakeDynamic(#MIXER, #DisplayState, #false)
- end
-
- on ExitMixer
- StopPlayMixer()
- stopPlayAllTracks()
- DelObjects([#MIXER])
- end
-
- on EnterJukeBox
- end
-
- on ExitJukeBox
- end
-
- on EnterD23
- if getaProp(getaProp(gStates, #Conditions), #radioStation) >= 1 then
- MakeDynamic(#WinDJCARtoE, #State, #Win)
- PDARelease("J04m14p.mov")
- end if
- end
-
- on doExitD22
- genexitkf(#D11)
- end
-
- on DoPointcombo
- set pointSet to [#T: point(233, 6), #BL: point(249, 286), #BR: point(299, 279), 1: point(169, 176), 2: point(145, 249), 3: point(388, 211), 4: point(347, 150)]
- set pointSet2 to [#T: point(233, 6), #BL: point(249, 286), #BR: point(299, 279), 1: point(169, 176), 2: point(145, 249), 3: point(388, 211), 4: point(347, 150)]
- repeat with Y in pointSet2
- set outlist to [:]
- repeat with X = 1 to count(pointSet)
- set aname to value("#" & getPropAt(pointSet, X))
- set arect to rect(the locH of Y, the locV of Y, the locH of getAt(pointSet, X), the locV of getAt(pointSet, X))
- setaProp(outlist, aname, arect)
- end repeat
- end repeat
- end
-